﻿@model IEnumerable<Meal>
@foreach (var o in Model)
{
    <li id='meal@(o.Id)' class="awe-li meal" data-val="@o.Id">
        <div>@o.Name
            <div class="fr">
                @Html.Partial("deletebtn", new DelBtn { Id = o.Id, IsDeleted = o.IsDeleted, Controller = "Meal" })
            </div>
        </div>
        <div>
            <div class="fl">
                <img  src='@Url.Content("~/pictures/Meals/" + (string.IsNullOrEmpty(o.Picture) ? "0.jpg" : o.Picture))' class="thumb"  alt='picture' /></div>
            <div class="comments">@o.Comments</div>
            <br class="cbt" />
        </div>
        <div class="cbt" style="margin-top: 0.5em;">
            <div class='cool fl'>
                <button class="awe-btn" onclick="@(Url.Awe().PopupAction().Url(Url.Action("ChangePicture", "Meal", new { o.Id })).Fullscreen(true).RemoveOnClose(false))" style="padding:0.1em 0.3em">@Mui.change_picture</button>
            </div>
            <div class='notcool fl'>                
                <button class="awe-btn" onclick="location.href='@Url.Action("ochangepicture", "Meal", new { o.Id })'">@Mui.change_picture</button>
            </div>
            <div class="fr">
                <button class="awe-btn bedit" onclick="@(Url.Awe().PopupFormAction().Url(Url.Action("Edit", "Meal", new { o.Id })).Success("edit"))" style="padding:0.1em 0.3em">
                    </button>
            </div>
        </div>
    </li>
}
